<template>
  <div class="">
    搜索页面
    <h1 v-red="'red'">111</h1>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  mounted() {},
  methods: {},
  components: {},
  directives: {
    // red(el, binding) {
    //   el.style.background = binding.value;
    // },
    red: {
      bind(el, binding) {
        el.style.background = binding.value;
      },
      update(el, binding) {
        el.style.background = binding.value;
      },
    },
  },
};
</script>

<style lang="scss"></style>
